﻿using System;
using System.Globalization;

namespace Microsoft.Xna.Framework.Graphics
{
	/// <summary>
	/// Represents a four-component color using red, green, blue, and alpha data.
	/// </summary>
    public struct Color : IEquatable<Color>
    {
        private uint packedValue;

		#region Properties
		/// <summary>
		/// Gets or sets the alpha component value.
		/// </summary>
		public byte A
		{
			get { return (byte)(this.packedValue >> 0x18); }
			set { this.packedValue = (this.packedValue & 0xffffff) | ((uint)(value << 0x18)); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:240 G:248 B:255 A:255.
		/// </summary>
		public static Color AliceBlue
		{
			get { return new Color(0xFFF0F8FF); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:250 G:235 B:215 A:255.
		/// </summary>
		public static Color AntiqueWhite
		{
			get { return new Color(0xFFFAEBD7); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:255 B:255 A:255.
		/// </summary>
		public static Color Aqua
		{
			get { return new Color(0xFF00FFFF); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:127 G:255 B:212 A:255.
		/// </summary>
		public static Color Aquamarine
		{
			get { return new Color(0xFF7FFFD4); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:240 G:255 B:255 A:255.
		/// </summary>
		public static Color Azure
		{
			get { return new Color(0xFFF0FFFF); }
		}

		/// <summary>
		/// Gets or sets the blue component value of this Color.
		/// </summary>
		public byte B
		{
			get { return (byte)this.packedValue; }
			set { this.packedValue = (this.packedValue & 0xffffff00) | value; }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:245 G:245 B:220 A:255.
		/// </summary>
		public static Color Beige
		{
			get { return new Color(0xFFF5F5DC); }
		}
		
		/// <summary>
		/// Gets a system-defined color with the value R:255 G:228 B:196 A:255.
		/// </summary>
		public static Color Bisque
		{
			get { return new Color(0xFFFFE4C4); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:0 B:0 A:255.
		/// </summary>
		public static Color Black
		{
			get { return new Color(0xFF000000); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:255 G:235 B:205 A:255.
		/// </summary>
		public static Color BlanchedAlmond
		{
			get { return new Color(0xFFFFEBCD); }
		}
		
		/// <summary>
		/// Gets a system-defined color with the value R:0 G:0 B:255 A:255.
		/// </summary>
		public static Color Blue
		{
			get { return new Color(0xFF0000FF); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:138 G:43 B:226 A:255.
		/// </summary>
		public static Color BlueViolet
		{
			get { return new Color(0xFF8A2BE2); }
		}
		
		/// <summary>
		/// Gets a system-defined color with the value R:165 G:42 B:42 A:255.
		/// </summary>
		public static Color Brown
		{
			get { return new Color(0xFFA52A2A); }
		}
		
		/// <summary>
		/// Gets a system-defined color with the value R:222 G:184 B:135 A:255.
		/// </summary>
		public static Color BurlyWood
		{
			get { return new Color(0xFFDEB887); }
		}
		
		/// <summary>
		/// Gets a system-defined color with the value R:95 G:158 B:160 A:255.
		/// </summary>
		public static Color CadetBlue
		{
			get { return new Color(0xFF5F9EA0); }
		}
		
		/// <summary>
		/// Gets a system-defined color with the value R:127 G:255 B:0 A:255.
		/// </summary>
		public static Color Chartreuse
		{
			get { return new Color(0xFF7FFF00); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:210 G:105 B:30 A:255.
		/// </summary>
		public static Color Chocolate
		{
			get { return new Color(0xFFD2691E); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:255 G:127 B:80 A:255.
		/// </summary>
		public static Color Coral
		{
			get { return new Color(0xFFFF7F50); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:100 G:149 B:237 A:255.
		/// </summary>
		public static Color CornflowerBlue
		{
			get { return new Color(0xF6495ED); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:255 G:248 B:220 A:255.
		/// </summary>
		public static Color Cornsilk
		{
			get { return new Color(0xFFFFF8DC); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:220 G:20 B:60 A:255.
		/// </summary>
		public static Color Crimson
		{
			get { return new Color(0xFFDC143C); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:255 B:255 A:255.
		/// </summary>
		public static Color Cyan
		{
			get { return new Color(0xFF00FFFF); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:0 B:139 A:255.
		/// </summary>
		public static Color DarkBlue
		{
			get { return new Color(0xFF00008B); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:139 B:139 A:255.
		/// </summary>
		public static Color DarkCyan
		{
			get { return new Color(0xFF008B8B); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:184 G:134 B:11 A:255.
		/// </summary>
		public static Color DarkGoldenrod
		{
			get { return new Color(0xFFB8860B); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:169 G:169 B:169 A:255.
		/// </summary>
		public static Color DarkGray
		{
			get { return new Color(0xFFA9A9A9); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:100 B:0 A:255.
		/// </summary>
		public static Color DarkGreen
		{
			get { return new Color(0xFF006400); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:189 G:183 B:107 A:255.
		/// </summary>
		public static Color DarkKhaki
		{
			get { return new Color(0xFFBDB76B); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:139 G:0 B:139 A:255.
		/// </summary>
		public static Color DarkMagenta
		{
			get { return new Color(0xFF8B008B); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:85 G:107 B:47 A:255.
		/// </summary>
		public static Color DarkOliveGreen
		{
			get { return new Color(0xff556b2f); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:255 G:140 B:0 A:255.
		/// </summary>
		public static Color DarkOrange
		{
			get { return new Color(0xFFFF8C00); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:153 G:50 B:204 A:255.
		/// </summary>
		public static Color DarkOrchid
		{
			get { return new Color(0xFF9932CC); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:139 G:0 B:0 A:255.
		/// </summary>
		public static Color DarkRed
		{
			get { return new Color(0xFF8B0000); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:233 G:150 B:122 A:255.
		/// </summary>
		public static Color DarkSalmon
		{
			get { return new Color(0xFFE9967A); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:143 G:188 B:139 A:255.
		/// </summary>
		public static Color DarkSeaGreen
		{
			get { return new Color(0xff8fbc8b); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:72 G:61 B:139 A:255.
		/// </summary>
		public static Color DarkSlateBlue
		{
			get { return new Color(0xFF483D8B); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:47 G:79 B:79 A:255.
		/// </summary>
		public static Color DarkSlateGray
		{
			get { return new Color(0xff2f4f4f); }
		}

		/// <summary>
		/// Gets a system-defined color with the value R:0 G:206 B:209 A:255.
		/// </summary>
		public static Color DarkTurquoise
		{
			get { return new Color(0xFF00CED1); }
		}
		public static Color DarkViolet
		{
			get
			{
				return new Color(0xff9400d3);
			}
		}
		public static Color DeepPink
		{
			get
			{
				return new Color(0xffff1493);
			}
		}
		public static Color DeepSkyBlue
		{
			get
			{
				return new Color(0xff00bfff);
			}
		}
		public static Color DimGray
		{
			get
			{
				return new Color(0xff696969);
			}
		}
		public static Color DodgerBlue
		{
			get
			{
				return new Color(0xff1e90ff);
			}
		}
		public static Color Firebrick
		{
			get
			{
				return new Color(0xffb22222);
			}
		}
		public static Color FloralWhite
		{
			get
			{
				return new Color(0xfffffaf0);
			}
		}
		public static Color ForestGreen
		{
			get
			{
				return new Color(0xff228b22);
			}
		}
		public static readonly Color Fuchsia = new Color(0xFFFF00FF);

		public byte G
		{
			get { return (byte)(this.packedValue >> 8); }
			set { this.packedValue = (this.packedValue & 0xffff00ff) | ((uint)(value << 8)); }
		}
		#endregion

		#region Constructors
		/// <summary>
		/// Creates a new instance of the class.
		/// </summary>
		/// <param name="color">A three-component color.</param>
		public Color(Vector3 color)
		{
			packedValue = (uint)((255 << 24) | (Convert.ToByte(color.X * 255) << 16) | (Convert.ToByte(color.Y * 255) << 8) | Convert.ToByte(color.Z * 255));
		}

		/// <summary>
		/// Creates a new instance of the class.
		/// </summary>
		/// <param name="color">A four-component color.</param>
        public Color(Vector4 color)
        {
			packedValue = (uint)((Convert.ToByte(color.W * 255) << 24) | (Convert.ToByte(color.X) << 16) | (Convert.ToByte(color.Y) << 8) | Convert.ToByte(color.Z));
        }

		private Color(uint packedValue)
		{
			this.packedValue = packedValue;
		}

		/// <summary>
		/// Creates a new instance of the class.
		/// </summary>
		/// <param name="r">Red component.</param>
		/// <param name="g">Green component.</param>
		/// <param name="b">Blue component.</param>
        public Color(byte r, byte g, byte b)
        {
			packedValue = (uint)((255 << 24) | (r << 16) | (g << 8) | b);
        }

		/// <summary>
		/// Creates a new instance of the class.
		/// </summary>
		/// <param name="r">Red component.</param>
		/// <param name="g">Green component.</param>
		/// <param name="b">Blue component.</param>
		public Color(float r, float g, float b)
		{
			packedValue = (uint)((255 << 24) | (Convert.ToByte(r * 255) << 16) | (Convert.ToByte(g * 255) << 8) | Convert.ToByte(b * 255));
		}

		/// <summary>
		/// Creates a new instance of the class.
		/// </summary>
		/// <param name="r">Red component.</param>
		/// <param name="g">Green component.</param>
		/// <param name="b">Blue component.</param>
		/// <param name="alpha">Alpha component.</param>
        public Color(byte r, byte g, byte b, byte alpha)
        {
			packedValue = (uint)((alpha << 24) | (r << 16) | (g << 8) | b);
        }

		/// <summary>
		/// Creates a new instance of the class.
		/// </summary>
		/// <param name="r">Red component.</param>
		/// <param name="g">Green component.</param>
		/// <param name="b">Blue component.</param>
		/// <param name="alpha">Alpha component.</param>
        public Color(float r, float g, float b, float alpha)
        {
			packedValue = (uint)((Convert.ToByte(alpha * 255) << 24) | (Convert.ToByte(r * 255) << 16) | (Convert.ToByte(g * 255) << 8) | Convert.ToByte(b * 255));
        }
		#endregion

		#region Internal Methods
		internal System.Windows.Media.Color ToSilverlightColor()
        {
            return System.Windows.Media.Color.FromArgb(A, R, G, B);
        }

        internal static int ToPrgbaInt(Color color)
        {
            int a = color.A;
            double pa = a / 255d;
            int r = (int)(color.R * pa);
            int g = (int)(color.G * pa);
            int b = (int)(color.B * pa);
            return (a << 24) + (r << 16) + (g << 8) + b;
        }
		#endregion

		#region Private Methods
		private static int ClampToByte32(int value)
		{
			if (value < 0)
			{
				return 0;
			}
			if (value > 0xff)
			{
				return 0xff;
			}
			return value;
		}

		private static int ClampToByte64(long value)
		{
			if (value < 0L)
			{
				return 0;
			}
			if (value > 0xffL)
			{
				return 0xff;
			}
			return (int)value;
		}
		#endregion

		public byte R
        {
            get { return (byte)(this.packedValue >> 0x10); }
            set { this.packedValue = (this.packedValue & 0xff00ffff) | ((uint)(value << 0x10)); }
        }

		#region Public Methods
		/// <summary>
		/// Test a color to see if it is equal to the color in this instance.
		/// </summary>
		/// <param name="other">A four-component color.</param>
		public bool Equals(Color other)
		{
			return (this == other);
		}

		/// <summary>
		/// Test an instance of a color object to see if it is equal to this object.
		/// </summary>
		/// <param name="obj">A color object.</param>
		public override bool Equals(object obj)
        {
            return ((obj is Color) && this.Equals((Color)obj));
        }

		/// <summary>
		/// Convert a non premultipled color into color data that contains alpha.
		/// </summary>
		/// <param name="vector">A four-component color.</param>
		public static Color FromNonPremultiplied(Vector4 vector)
		{
			return new Color(vector.X * vector.W, vector.Y * vector.W, vector.Z * vector.W, vector.W);
		}

		/// <summary>
		/// Converts a non-premultipled alpha color to a color that contains premultiplied alpha.
		/// </summary>
		/// <param name="r">Red component.</param>
		/// <param name="g">Green component.</param>
		/// <param name="b">Blue component.</param>
		/// <param name="a">Alpha component.</param>
		public static Color FromNonPremultiplied(int r, int g, int b, int a)
		{
			return new Color(
				ClampToByte64((r * a) / 255),
				ClampToByte64((g * a) / 255),
				ClampToByte64((b * a) / 255),
				ClampToByte32(a));
		}

		/// <summary>
		/// Serves as a hash function for a particular type.
		/// </summary>
		public override int GetHashCode()
		{
			return this.packedValue.GetHashCode();
		}

		/// <summary>
		/// Linearly interpolate a color.
		/// </summary>
		/// <param name="value1">A four-component color.</param>
		/// <param name="value2">A four-component color.</param>
		/// <param name="amount">Interpolation factor.</param>
		public static Color Lerp(Color value1, Color value2, Single amount)
		{
			return new Color(
				(byte)MathHelper.Lerp(value1.R, value2.R, amount),
				(byte)MathHelper.Lerp(value1.G, value2.G, amount),
				(byte)MathHelper.Lerp(value1.B, value2.B, amount),
				(byte)MathHelper.Lerp(value1.A, value2.A, amount));
		}

		/// <summary>
		/// Gets a string representation of this object.
		/// </summary>
		public override string ToString()
		{
			return string.Format(CultureInfo.CurrentCulture, "{{R:{0} G:{1} B:{2} A:{3}}}", this.R, this.G, this.B, this.A);
		}

		/// <summary>
		/// Gets a three-component vector representation for this object.
		/// </summary>
		public Vector3 ToVector3()
		{
			Vector3 vector = new Vector3();
			vector.X = R;
			vector.Y = G;
			vector.Z = B;
			return vector;
		}

		/// <summary>
		/// Gets a four-component vector representation for this object.
		/// </summary>
		public Vector4 ToVector4()
		{
			return new Vector4(R, G, B, A);
		}
		#endregion

		#region Operators
		public static bool operator ==(Color a, Color b)
		{
			return (a.packedValue == b.packedValue);
		}

		public static bool operator !=(Color a, Color b)
		{
			return (a.packedValue != b.packedValue);
		}

		public static Color operator *(Color left, float scale)
		{
			return new Color(left.R * scale, left.G * scale, left.B * scale, left.A * scale);
		}
		#endregion
        
        public static Color Gainsboro
        {
            get
            {
                return new Color(0xffdcdcdc);
            }
        }
        public static Color GhostWhite
        {
            get
            {
                return new Color(0xfff8f8ff);
            }
        }
        public static Color Gold
        {
            get
            {
                return new Color(0xffffd700);
            }
        }
        public static Color Goldenrod
        {
            get
            {
                return new Color(0xffdaa520);
            }
        }
        public static Color Gray
        {
            get
            {
                return new Color(0xff808080);
            }
        }

        public static readonly Color Green = new Color(0xFF008000);
        
        public static Color GreenYellow
        {
            get
            {
                return new Color(0xffadff2f);
            }
        }
        public static Color Honeydew
        {
            get
            {
                return new Color(0xfff0fff0);
            }
        }
        public static Color HotPink
        {
            get
            {
                return new Color(0xffff69b4);
            }
        }
        public static Color IndianRed
        {
            get
            {
                return new Color(0xffcd5c5c);
            }
        }
        public static Color Indigo
        {
            get
            {
                return new Color(0xff4b0082);
            }
        }
        public static Color Ivory
        {
            get
            {
                return new Color(0xfffffff0);
            }
        }
        public static Color Khaki
        {
            get
            {
                return new Color(0xfff0e68c);
            }
        }
        public static Color Lavender
        {
            get
            {
                return new Color(0xffe6e6fa);
            }
        }
        public static Color LavenderBlush
        {
            get
            {
                return new Color(0xfffff0f5);
            }
        }
        public static Color LawnGreen
        {
            get
            {
                return new Color(0xff7cfc00);
            }
        }
        public static Color LemonChiffon
        {
            get
            {
                return new Color(0xfffffacd);
            }
        }
        public static Color LightBlue
        {
            get
            {
                return new Color(0xffadd8e6);
            }
        }
        public static Color LightCoral
        {
            get
            {
                return new Color(0xfff08080);
            }
        }
        public static Color LightCyan
        {
            get
            {
                return new Color(0xffe0ffff);
            }
        }
        public static Color LightGoldenrodYellow
        {
            get
            {
                return new Color(0xfffafad2);
            }
        }
        public static Color LightGreen
        {
            get
            {
                return new Color(0xff90ee90);
            }
        }
        public static Color LightGray
        {
            get
            {
                return new Color(0xffd3d3d3);
            }
        }
        public static Color LightPink
        {
            get
            {
                return new Color(0xffffb6c1);
            }
        }
        public static Color LightSalmon
        {
            get
            {
                return new Color(0xffffa07a);
            }
        }
        public static Color LightSeaGreen
        {
            get
            {
                return new Color(0xff20b2aa);
            }
        }
        public static Color LightSkyBlue
        {
            get
            {
                return new Color(0xff87cefa);
            }
        }
        public static Color LightSlateGray
        {
            get
            {
                return new Color(0xff778899);
            }
        }
        public static Color LightSteelBlue
        {
            get
            {
                return new Color(0xffb0c4de);
            }
        }
        public static Color LightYellow
        {
            get
            {
                return new Color(0xffffffe0);
            }
        }
        public static readonly Color Lime = new Color(0xFF00FF00);
        
        public static Color LimeGreen
        {
            get
            {
                return new Color(0xff32cd32);
            }
        }
        public static Color Linen
        {
            get
            {
                return new Color(0xfffaf0e6);
            }
        }
        public static readonly Color Magenta = new Color(0xFFFF00FF);
        
        public static Color Maroon
        {
            get
            {
                return new Color(0xff800000);
            }
        }
        public static Color MediumAquamarine
        {
            get
            {
                return new Color(0xff66cdaa);
            }
        }
        public static Color MediumBlue
        {
            get
            {
                return new Color(0xff0000cd);
            }
        }
        public static Color MediumOrchid
        {
            get
            {
                return new Color(0xffba55d3);
            }
        }
        public static Color MediumPurple
        {
            get
            {
                return new Color(0xff9370db);
            }
        }
        public static Color MediumSeaGreen
        {
            get
            {
                return new Color(0xff3cb371);
            }
        }
        public static Color MediumSlateBlue
        {
            get
            {
                return new Color(0xff7b68ee);
            }
        }
        public static Color MediumSpringGreen
        {
            get
            {
                return new Color(0xff00fa9a);
            }
        }
        public static Color MediumTurquoise
        {
            get
            {
                return new Color(0xff48d1cc);
            }
        }
        public static Color MediumVioletRed
        {
            get
            {
                return new Color(0xffc71585);
            }
        }
        public static Color MidnightBlue
        {
            get
            {
                return new Color(0xff191970);
            }
        }
        public static Color MintCream
        {
            get
            {
                return new Color(0xfff5fffa);
            }
        }
        public static Color MistyRose
        {
            get
            {
                return new Color(0xffffe4e1);
            }
        }
        public static Color Moccasin
        {
            get
            {
                return new Color(0xffffe4b5);
            }
        }
        public static Color NavajoWhite
        {
            get
            {
                return new Color(0xffffdead);
            }
        }
        public static Color Navy
        {
            get
            {
                return new Color(0xff000080);
            }
        }
        public static Color OldLace
        {
            get
            {
                return new Color(0xfffdf5e6);
            }
        }
        public static Color Olive
        {
            get
            {
                return new Color(0xff808000);
            }
        }
        public static Color OliveDrab
        {
            get
            {
                return new Color(0xff6b8e23);
            }
        }
        public static Color Orange
        {
            get
            {
                return new Color(0xffffa500);
            }
        }
        public static Color OrangeRed
        {
            get
            {
                return new Color(0xffff4500);
            }
        }
        public static Color Orchid
        {
            get
            {
                return new Color(0xffda70d6);
            }
        }
        public static Color PaleGoldenrod
        {
            get
            {
                return new Color(0xffeee8aa);
            }
        }
        public static Color PaleGreen
        {
            get
            {
                return new Color(0xff98fb98);
            }
        }
        public static Color PaleTurquoise
        {
            get
            {
                return new Color(0xffafeeee);
            }
        }
        public static Color PaleVioletRed
        {
            get
            {
                return new Color(0xffdb7093);
            }
        }
        public static Color PapayaWhip
        {
            get
            {
                return new Color(0xffffefd5);
            }
        }
        public static Color PeachPuff
        {
            get
            {
                return new Color(0xffffdab9);
            }
        }
        public static Color Peru
        {
            get
            {
                return new Color(0xffcd853f);
            }
        }
        public static Color Pink
        {
            get
            {
                return new Color(0xffffc0cb);
            }
        }
        public static Color Plum
        {
            get
            {
                return new Color(0xffdda0dd);
            }
        }
        public static Color PowderBlue
        {
            get
            {
                return new Color(0xffb0e0e6);
            }
        }
        public static Color Purple
        {
            get
            {
                return new Color(0xff800080);
            }
        }

        public static readonly Color Red = new Color(0xFFFF0000);
        
        public static Color RosyBrown
        {
            get
            {
                return new Color(0xffbc8f8f);
            }
        }
        public static Color RoyalBlue
        {
            get
            {
                return new Color(0xff4169e1);
            }
        }
        public static Color SaddleBrown
        {
            get
            {
                return new Color(0xff8b4513);
            }
        }
        public static Color Salmon
        {
            get
            {
                return new Color(0xfffa8072);
            }
        }
        public static Color SandyBrown
        {
            get
            {
                return new Color(0xfff4a460);
            }
        }
        public static Color SeaGreen
        {
            get
            {
                return new Color(0xff2e8b57);
            }
        }
        public static Color SeaShell
        {
            get
            {
                return new Color(0xfffff5ee);
            }
        }
        public static Color Sienna
        {
            get
            {
                return new Color(0xffa0522d);
            }
        }

        public static readonly Color Silver = new Color(0xFFC0C0C0);
        
        public static Color SkyBlue
        {
            get
            {
                return new Color(0xff87ceeb);
            }
        }
        public static Color SlateBlue
        {
            get
            {
                return new Color(0xff6a5acd);
            }
        }
        public static Color SlateGray
        {
            get
            {
                return new Color(0xff708090);
            }
        }
        public static Color Snow
        {
            get
            {
                return new Color(0xfffffafa);
            }
        }
        public static Color SpringGreen
        {
            get
            {
                return new Color(0xff00ff7f);
            }
        }
        public static Color SteelBlue
        {
            get
            {
                return new Color(0xff4682b4);
            }
        }
        public static Color Tan
        {
            get
            {
                return new Color(0xffd2b48c);
            }
        }
        public static Color Teal
        {
            get
            {
                return new Color(0xff008080);
            }
        }
        public static Color Thistle
        {
            get
            {
                return new Color(0xffd8bfd8);
            }
        }
        public static Color Tomato
        {
            get
            {
                return new Color(0xffff6347);
            }
        }

		public static readonly Color TransparentBlack = new Color(0);
		public static readonly Color TransparentWhite = new Color(0xFFFFFF);

        public static Color Turquoise
        {
            get
            {
                return new Color(0xff40e0d0);
            }
        }
        public static Color Violet
        {
            get
            {
                return new Color(0xffee82ee);
            }
        }
        public static Color Wheat
        {
            get
            {
                return new Color(0xfff5deb3);
            }
        }

        public static readonly Color White = new Color(0xFFFFFFFF);
        
        public static Color WhiteSmoke
        {
            get
            {
                return new Color(0xfff5f5f5);
            }
        }

        public static readonly Color Yellow = new Color(0xFFFFFF00);

        public static Color YellowGreen
        {
            get
            {
                return new Color(0xff9acd32);
            }
        }

        public UInt32 PackedValue
        {
            get { return packedValue; }
            set { packedValue = value; }
        }
    }
}
